package com.person.leetcode.editor.cn;

/**
  * 283.移动零
  * 2022-08-23 11:41:25
**/
public class Sequence_0283_MoveZeroes {
    public static void main(String[] args) {
        Solution solution = new Sequence_0283_MoveZeroes().new Solution();
    }
    //leetcode submit region begin(Prohibit modification and deletion)
class Solution {
    public void moveZeroes(int[] nums) {
        //102030405
        int zeroTime = 0;
        for (int i = 0; i < nums.length; i++) {
            if (0==nums[i]){
                zeroTime++;
            }else{
                int t = nums[i];
                nums[i]=0;
                nums[i-zeroTime]=t;
            }
        }
    }
}
//leetcode submit region end(Prohibit modification and deletion)

}